(function($) {
	var Page = {
		check : function() {
			return false;
		},
		
		loaded : function() {},
		
		ready : function() {}
	};
	
	tlr.Pages = {
		'main' : {
			check : function() {
				return $('#mob, #contentselect').size() == 2;
			},
			
			ready : function() {
				
			}
		},
		
		/**
		 * ReCaptcha page
		 */
		'captcha' : {
			/**
			 * Check if this is a ReCaptcha page
			 *
			 * @returns {Boolean} "true" if this is a ReCaptcha page
			 */
			check : function() {
				return $('#recaptcha_div').size();
			},
			
			/**
			 * "loaded" state handler
			 */
			loaded : function() {
				bot.log('ReCaptcha');
				
				if (webkitNotifications.checkPermission() == 0) {
					webkitNotifications.createNotification('', 'TLR Bot', 'Check the ReCaptcha').show();
				}
			}
		},
		
		'battle' : {
			check : function() {
				return $('#battlebutton').val() == 'Battle Again';
			},
			
			loaded : function() {
				
			},
			
			ready : function() {
				
			}
		}
	};
	
	for (var i in tlr.Pages) {
		tlr.Pages[i] = $.extend({}, Page, tlr.Pages[i]);
	}
})(jQuery);
